import axios from 'axios'

import { IRouteLine } from '../interface'
import { flatteRouteData } from '../utils'
import './__mock__'

/** 获取路由链路oms */
export const apiGetOriginalRouteInfo = async (waybillNo: string): Promise<IRouteLine[]> => {
  return axios.post(`/tmsapi/waybill_record/waybillLine`, { waybillNo }).then(res => flatteRouteData(res.$data || []))
}
